package com.sean.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.sean.animation.DragItemView;
import com.sean.animation.TranslateView;

public class AnimationActivity extends Activity implements OnClickListener {

	private Button mBtn;
	private DragItemView mTranslateView;
	private DragItemView mTranslateView2;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.animation_translate);
        mBtn = (Button)this.findViewById(R.id.btn);
        mTranslateView = (DragItemView)this.findViewById(R.id.translateView);
        mTranslateView2 = (DragItemView)this.findViewById(R.id.translateView2);
        
        mBtn.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		mTranslateView.startAnimation(100, 200);
		mTranslateView2.startAnimation(-100, 100);
	}
}
